package com.leejie.springboot01.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;

import java.util.Locale;

//扩展springmvc
@Configuration
public class MyMvcConfig {

    @Bean
    public ViewResolver myViewResolver(){
        return new MyViewResolver();
    }



    //自定一乐一个自己的视图解析器 --> MyViewResolver
    public static class MyViewResolver implements ViewResolver{
        @Override
        public View resolveViewName(String s, Locale locale) throws Exception {
            return null;
        }
    }

}

